package com.library.model.daoimple;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.library.model.dao.BookDAO;
import com.library.model.dto.book.BookDTO;

public class BookDAOImple extends SqlMapClientDaoSupport implements BookDAO {

	public List<BookDTO> getAllBook() {
		return (List<BookDTO>)getSqlMapClientTemplate().queryForList("BookMap.getAllBook");
	}

	@Override
	public void insertBook(BookDTO dto) {
		getSqlMapClientTemplate().insert("BookMap.insertBook", dto);
	}

	@Override
	public void deleteBook(String bookId) {
		getSqlMapClientTemplate().delete("BookMap.deleteBook", bookId);
		
	}


}
